package com.zhuss.juc;

import java.util.concurrent.Future;


public class ThreadPoolFactoryTest {
	
	public static void main(String[] args) {
		for (int i = 0; i < 20; i++) {
			new Thread(
					() -> {
						Future<?> f = ThreadPoolFactory.getInstance().submit(()->{
							try {
								Thread.sleep(1000);
							} catch (Exception e) {
							}
							System.out.println(Thread.currentThread().getName() + "121212");
						});
						System.out.println(f);
					}
					).start();
		}
		
	}

}
